home *** CD-ROM | disk | FTP | other *** search
/ PC go! 1997 May / PC_GO 5:97.iso / brwsutl4.sbk (.txt) < prev    next >
Encoding:
Asymetrix ToolBook File  |  1996-11-13  |  31.6 KB  |  553 lines

  1. @    (    (    K
  2. *ClassTbl*
  3. *ClassEntry*
  4. *PTABLE*
  5. *WINDOWSEG*
  6. *ICONRESTAB*
  7. *ICONRESSEG*
  8. *ICONRES*
  9. Background
  10. *OBJTABLE*
  11. *IDTABLE*
  12. *NAMETAB*
  13. Rectangle
  14. Ellipse
  15. RoundedRectangle
  16. Polygon
  17. IrregularPolygon
  18. AngledLine
  19. Curve
  20. PaintObject
  21. Picture
  22. Group
  23. Stage
  24. Button
  25. Viewer
  26. ComboBox
  27. Field
  28. RecordField
  29. Hotword
  30. *RHOTWORD*
  31. *TbxBase*
  32.     (    ewer
  33. bxBase*
  34.     (    bxBase*
  35. &File
  36. &Open...    Ctrl+O
  37. &Save    Ctrl+S
  38. Save &As...
  39. saveas
  40. &Import...
  41. import
  42. &Export...
  43. export
  44. Print Set&up...
  45. printsetup
  46. &Print Pages...    Ctrl+P
  47. printpages
  48. Prin&t Report...
  49. printreport
  50. Send &Mail...
  51. sendmail
  52. &Run...
  53. E&xit    Alt+F4
  54. &Edit
  55. &Undo    Ctrl+Z
  56. Cu&t    Ctrl+X
  57. &Copy    Ctrl+C
  58. &Paste    Ctrl+V
  59. paste
  60. C&lear    Del
  61. clear
  62. Select &All    Shift+F9
  63. selectall
  64. Select Pa&ge    Shift+F12
  65. selectpage
  66. &Size to Page    F11
  67. sizetopage
  68. F&ind...    F5
  69. Re&place...
  70. replace
  71. Aut&hor    F3
  72. author
  73. &Text
  74. &Character...    F6
  75. character
  76. &Paragraph...    F7
  77. paragraph
  78. &Regular    Ctrl+Space
  79. regular
  80. &Bold    Ctrl+B
  81. &Italic    Ctrl+I
  82. italic
  83. &Underline    Ctrl+U
  84. underline
  85. Stri&keout    Ctrl+K
  86. strikeout
  87. Superscrip&t/Subscript
  88. superscriptSubscript
  89. &Normal Script
  90. normalscript
  91. Su&bscript    Ctrl+L
  92. subscript
  93. Su&perscript    Ctrl+Shift+L
  94. superscript
  95. &Show Hotwords    F9
  96. showhotwords
  97. &Page
  98. &Next    Alt+Right
  99. &Previous    Alt+Left
  100. previous
  101. &First    Alt+Up
  102. first
  103. &Last    Alt+Down
  104. &Back    Shift+F2
  105. &History...    Ctrl+F2
  106. history
  107. N&ew Page    Ctrl+N
  108. newpage
  109. &Help
  110. &Contents    F1
  111. contents
  112. Status &Bar    F12
  113. statusbar
  114. _FindNetscapeExe
  115. Browser Utility functions
  116. FindNetscapeExe
  117. _FindIExploreExe
  118. Browser Utility functions
  119. FindIExploreExe
  120. Netscape
  121. Browser Utility functions
  122. Mq_OpenURL
  123. OpenURLInNetscape
  124. IExplore
  125. Browser Utility functions
  126. Mq_OpenURL
  127. OpenURLInIExplore
  128. Browser Utility functions
  129. yT_GetRemoteURL
  130. GetRemoteURL
  131. >_GetRemoteURLTitle
  132. Browser Utility functions
  133. GetRemoteURLTitle
  134. Browser Utility functions
  135. P_CloseBrowser
  136. CloseBrowser
  137. _ActivateBrowser
  138. Browser Utility functions
  139. ActivateBrowser
  140. win.ini
  141. fileExists
  142. linkMyDLLs
  143. HKEY_CLASSES_ROOT
  144. NetscapeMarkup
  145. }ReadWindowsRegistry
  146. embedding
  147. GetIniVar
  148. NetscapeMarkup\protocol\StdFileEditing\server
  149. _FindNetscapeExe
  150. HKEY_LOCAL_MACHINE
  151. fileExists
  152. linkMyDLLs
  153. SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE
  154. }ReadWindowsRegistry
  155. _FindIExploreExe
  156. Netscape
  157. Mq_OpenURL
  158. _OpenURLInNetscape
  159. IExplore
  160. Mq_OpenURL
  161. _OpenURLInIExplore
  162. Netscape
  163. 0xFFFFFFFF
  164. WWW_GetWindowInfo
  165. _GetRemoteURL
  166. Netscape
  167. 0xFFFFFFFF
  168. WWW_GetWindowInfo
  169. _GetRemoteURLTitle
  170. )(FindNetscapeWindowHandle
  171. Netscape
  172. 0xFFFFFFFF
  173. PostMessage
  174. PostMessageDWORD
  175. PostMessageDWORD
  176. WWW_Exit
  177. No server
  178. _CloseBrowser
  179. WWW_Activate
  180. Netscape
  181. 0xFFFFFFFF
  182. No server
  183. _ActivateBrowser
  184. WWW_OpenURL
  185. Iexplore
  186. _ActivateBrowser
  187. false
  188. _FindNetscapeExe
  189. WWW_Activate
  190. exeName
  191. 0xFFFFFFFF
  192. _FindIExploreExe
  193. Netscape
  194. 0xFFFFFFFF,0x0
  195. FALSE
  196. ,0,"","",
  197. winID
  198. No Server
  199. _OpenURL
  200. 1,    #>
  201. GetIniVar
  202. FileExists
  203. dos.dll
  204. win.dll
  205. dllName
  206. linkMyDLLs
  207. AlpHKey
  208. GlobalLockPointer
  209. GlobalUnlock
  210. HKEY_LOCAL_MACHINE
  211. hBuff
  212. RegOpenKey
  213. RegQueryValue
  214. RegDeleteKey
  215. RegCloseKey
  216. kernel
  217. HKEY_CURRENT_CONFIG
  218. dwMainKey
  219. AHKEY_CLASSES_ROOT
  220. AlpParams
  221. HKEY_CURRENT_USER
  222. shell
  223. RegCloseKey
  224. hParams
  225. HKEY_USERS
  226. GlobalFree
  227. HKEY_PERFORMANCE_DATA
  228. lpCbBuff
  229. Memory alloc error while trying to get registry Info
  230. >eRegQueryValue
  231. GlobalAlloc
  232. GlobalLock
  233. GlobalLockPointer
  234. GlobalUnlock
  235. GlobalFree
  236. GlobalAlloc
  237. lpBuff
  238. RegOpenKey
  239. AHKEY_DYN_DATA
  240. ReadWindowsRegistry
  241. FindWindow
  242. FindWindowByText
  243. Netscape
  244. 0xFFFFFFFF
  245. WWW_GetWindowInfo
  246. FindWindowByText
  247. FindNetscapeWindowHandle
  248. FindNetscapeExe
  249. _FindNetscapeExe 
  250. "Browser Utility functions" 
  251. FindIExploreExe
  252. _FindIExploreExe 
  253. OpenURLInNetscape 
  254. _OpenURL(
  255. OpenURLInIExplore 
  256. GetRemoteURL browserName
  257.  _GetRemoteURL(
  258. GetRemoteURLTitle 
  259. _GetRemoteURLTitle(
  260. CloseBrowser 
  261. _CloseBrowser(
  262. ActivateBrowser 
  263. _ActivateBrowser(
  264. _FindNetscapeExe
  265. linkMyDLLs
  266. ReadWindowsRegistry("HKEY_CLASSES_ROOT",\
  267. "NetscapeMarkup\protocol\StdFileEditing\server",NULL)
  268. fileExists(
  269. ) < 1
  270. GetIniVar("embedding","
  271. y","win.ini")
  272. ) < 1
  273. _FindIExploreExe
  274. y("HKEY_LOCAL_MACHINE",\
  275. "SOFTWARE\Microsoft\
  276. \CurrentVersion\App Paths\IEXPLORE.EXE",
  277. ) < 1
  278. _OpenURLInNetscape 
  279. _OpenURLInIExplore 
  280. _GetRemoteURL browserName
  281.     itm = "0xFFFFFFFF"
  282. M"WWW_GetWindowInfo"
  283. _GetRemoteURLTitle 
  284.         p = 
  285. ~("[",
  286. p > 0 
  287. _CloseBrowser 
  288. M"WWW_Exit"
  289.         -- 
  290. Navigator does 
  291. xaccept 
  292.         -- Try a much harder method
  293.         hWnd = FindNetscapeWindowHandle()
  294.             linkDLL "user"
  295. INT PostMessageDWORD = 
  296.             -- 
  297. + a WM_CLOSE message
  298. ,0x0010,0,0)
  299. ("No 
  300. _ActivateBrowser 
  301. M"WWW_Activate"
  302. ("No 
  303.  URL, 
  304.     OK = 
  305. xFALSE
  306.     winID = "0
  307.     cmd = QUOTE & url & 
  308. ," & 
  309. M& ",0,
  310. M"WWW_OpenURL"
  311. ~("No Server", 
  312. r) > 0
  313. r; ss = 
  314.             exeName = 
  315. "Iexplore"
  316.  & ".
  317.         OK = 
  318. FlushMessageQueue()
  319.         OK = (
  320. ~("OK", 
  321. r) = 1)
  322. ,0x0" 
  323. sysVersion & 
  324.     dllName = "tb" & 
  325.         STRING 
  326. & "dos.
  327. FileExists(
  328.  MainKey, keyName
  329. ZResult
  330. errNo
  331. isType(
  332.         dwMainKey = 
  333. 0x80000000
  334. $"HKEY_CURRENT_USER"
  335. >0x80000001
  336. V0x80000002
  337. c"HKEY_USERS"
  338. v0x80000003
  339. "HKEY_PERFORMANCE_DATA"
  340. 0x80000004
  341. "HKEY_CURRENT_CONFIG"
  342. 0x80000005
  343. "HKEY_DYN_DATA"
  344. 0x80000006
  345. kernel"
  346. GlobalAlloc(
  347.         POINTER GlobalLockPointer = 
  348. GlobalUnlock(
  349. GlobalFree(
  350. shell"
  351.         LONG RegOpenKey(
  352. RegQueryValue(
  353. RegDeleteKey(
  354. RegCloseKey(
  355.     hBuff = 
  356. 0x2040,256)
  357.  = -41; 
  358.         lpBuff = 
  359. "0,0"
  360.  = -41
  361.         hParams = 
  362.             lpParams = 
  363. "0,0"
  364.  = -41
  365.         lpCbBuff = 
  366.         lpHKey = 
  367. "Memory alloc error 
  368. ctrying 
  369. registry 
  370.     r = 
  371. , lpHkey)
  372. r = 0 -- ERROR_SUCCESS
  373. PointerDWORD(0,
  374. PointerLONG(0,
  375. ,255)
  376. , "", 
  377.         result = pointerSTRING(0,
  378. FindWindowByText=
  379. <BookPath>
  380. :HDMEDIAPATH
  381. System
  382. Arial
  383. Arial
  384. Claude Ostyn
  385. info_LastSavedBy
  386. 11/11/96 2:57:57 PM
  387. info_LastSaved
  388. Claude Ostyn
  389. 11/13/96 1:49:22 PM
  390. 11/13/96 1:49:33 PM
  391. _FindNetscapeExe
  392. Browser Utility functions
  393. FindNetscapeExe
  394. _FindIExploreExe
  395. Browser Utility functions
  396. FindIExploreExe
  397. Netscape
  398. Browser Utility functions
  399. Mq_OpenURL
  400. OpenURLInNetscape
  401. IExplore
  402. Browser Utility functions
  403. Mq_OpenURL
  404. OpenURLInIExplore
  405. Browser Utility functions
  406. yT_GetRemoteURL
  407. GetRemoteURL
  408. >_GetRemoteURLTitle
  409. Browser Utility functions
  410. GetRemoteURLTitle
  411. FindNetscapeExe
  412. _FindNetscapeExe 
  413. "Browser Utility functions" 
  414. FindIExploreExe
  415. _FindIExploreExe 
  416. OpenURLInNetscape 
  417. _OpenURL(
  418. OpenURLInIExplore 
  419. GetRemoteURL browserName
  420.  _GetRemoteURL(
  421. GetRemoteURLTitle 
  422. _GetRemoteURLTitle(
  423. Claude Ostyn
  424. Claude Ostyn
  425. Browser Utility Functions
  426. co 13NOV96
  427. The script of this book contains the following functions:
  428. Function:    FindNetscapeExe( )
  429. Description:    Searches the Windows Registry to locate the current version of Netscape.exe.
  430. Parameters:    None
  431. Returns:    Fully qualified file name of Netscape.exe, if found on the system.
  432. Function:    FindIExploreExe( )
  433. Description:    Searches the Windows Registry to locate the current version of Microsoft Internet Explorer (IExplore.exe).
  434. Parameters:    None
  435. Returns:    Fully qualified file name of iExplore.exe, if found on the system.
  436. Function:    OpenURLInNetscape(<URL>, <bringToFront>)
  437. Description:    Opens the specified URL in Netscape, launching Netscape.exe if necessary. If Netscape is already running, opens the URL in the current Netscape window.
  438. Parameters:    <URL>    The URL to open.
  439.     <bringToFront>    TRUE or FALSE.
  440. Returns:    TRUE if no eror was detected.
  441. Note:    This function may return control to your script before the browser actually executes the requested operation.    
  442. Function:    OpenURLInIExplore(<URL>, <bringToFront>)
  443. Description:    Opens the specified URL in Microsoft Internet Explorer, launching IExplore.exe if necessary. If IExplore is already running, opens the URL in the current IExplore window.
  444. Parameters:    <URL>    The URL to open.
  445.     <bringToFront>    TRUE or FALSE.
  446. Returns:    TRUE if no eror was detected.
  447. Note:    This function may return control to your script before the browser actually executes the requested operation.    
  448. Function:    GetRemoteURL( browserName)
  449. Description:    Gets the URL for the page currently displayed by the specified browser.
  450. Parameters:    <browserName>  Must be "Netscape" or "IExplore"
  451. Returns:    The URL for the currently displayed page, or NULL if not available.
  452. Function:    GetRemoteURLTitle(browserName)
  453. Description:    Gets the title of the page currently displayed by the specified browser. 
  454. Parameters:    <browserName>  Must be "Netscape" or "IExplore"
  455. Returns:    The title of the currently displayed page, or NULL if not available.
  456. Function:    CloseBrowser(browserName)
  457. Description:    Closes the current browser window. If this is the only window of the browser, closes the browser completely.
  458. Parameters:    <browserName>  Must be "Netscape" or "IExplore"
  459. Returns:    TRUE if the browser was running.
  460. Note:    This function may return control to your script before the browser actually executes the requested operation.    
  461. Function:    ActivateBrowser(browserName)
  462. Description:    Activates the current browser window. Normally, the window becomes the active window.
  463. Parameters:    <browserName>  Must be "Netscape" or "IExplore"
  464. Returns:    TRUE if the browser was running and accepted the command.
  465. Note:    This function may return control to your script before the browser actually executes the requested operation.    
  466. Result of FindNetscapeExe( )
  467. FindNetscapeExe
  468. buttonClick
  469. buttonClick
  470. FindNetscapeExe()
  471. "Result 
  472.  )" & CRLF & 
  473. Result of FindIExploreExe( )
  474. FindIExploreExe
  475. buttonClick
  476. buttonClick
  477. FindIExploreExe()
  478. "Result 
  479.  )" & CRLF & 
  480. Result of OpenURLInNetscape( )
  481. www.asymetrix.com
  482. OpenURLInNetscape
  483. buttonClick
  484. buttonClick
  485. OpenURLInNetscape("www.asymetrix.com", 
  486. "Result 
  487. 4 )" & CRLF & 
  488. Result of OpenURLInIexplore( )
  489. OpenURLInIExplore
  490. www.asymetrix.com
  491. buttonClick
  492. buttonClick
  493. OpenURLInIExplore("www.asymetrix.com", 
  494. "Result 
  495. OpenURLInIexplore( )" & CRLF & 
  496. IExplore
  497. Result of getRemoteURL("IExplore")
  498. nullStrOr
  499. Netscape
  500. 81getRemoteURL
  501. Result of getRemoteURL("Netscape")
  502. buttonClick
  503. <null result>
  504. nullStrOr
  505. buttonClick
  506. nullStrOr(getRemoteURL("Netscape"))
  507.     txt = "Result 
  508. ")" & CRLF & 
  509. ;IExplore"))
  510.         s = "<
  511. yresult>"
  512. IExplore
  513. Result of getRemoteURLTitle("Netscape")
  514. nullStrOr
  515. Netscape
  516. Result of getRemoteURLTitle("IExplore")
  517. getRemoteURLTitle
  518. buttonClick
  519. <null result>
  520. nullStrOr
  521. buttonClick
  522. nullStrOr(getRemoteURLTitle("Netscape"))
  523.     txt = "Result 
  524. ")" & CRLF & 
  525. AIExplore"))
  526.         s = "<
  527. yresult>"
  528. IExplore
  529. }-CloseBrowser
  530. Result of CloseBrowser("IExplore")
  531. Netscape
  532. Result of CloseBrowser("Netscape")
  533. buttonClick
  534. buttonClick
  535. CloseBrowser("Netscape")
  536.     txt = "Result 
  537. ")" & CRLF & 
  538. @IExplore")
  539. IExplore
  540. Netscape
  541. Result of ActivateBrowser("IExplore")
  542. ActivateBrowser
  543. Result of ActivateBrowser("Netscape")
  544. buttonClick
  545. buttonClick
  546. ActivateBrowser("Netscape")
  547.     txt = "Result 
  548. ")" & CRLF & 
  549. CIExplore")
  550. 9611131330481212191516297296
  551. ASYM_TpID
  552. Browser Utility Functions
  553.